import Router from '@koa/router'
import {
    deletePayMethodByIdController,
    getPayMethodOptionListController,
    getPayMethodPageController,
    postPayMethodController,
    putPayMethodByIdController,
} from '../controllers/payMethod'

const payMethodRouter = new Router({
    prefix: '/pay-method',
})

// 用户的增删改查
payMethodRouter.get('/', getPayMethodPageController) // 获取用户列表
payMethodRouter.get('/option-list', getPayMethodOptionListController) // 获取用户列表
payMethodRouter.post('/', postPayMethodController) // 添加用户
payMethodRouter.put('/:id', putPayMethodByIdController) // 修改用户信息
payMethodRouter.delete('/:id', deletePayMethodByIdController) // 删除用户

export default payMethodRouter
